package com.shiwenping.reply.data;

import io.realm.DynamicRealm;
import io.realm.FieldAttribute;
import io.realm.Realm;
import io.realm.RealmConfiguration;
import io.realm.RealmMigration;
import io.realm.RealmSchema;

/**
 * Created by shiwenping on 17-10-9.
 * <p>
 * Version:
 */
public class RealmUtil {
    public static Realm getRealm() {
        RealmConfiguration realmConfiguration = new RealmConfiguration.Builder()
                .schemaVersion(1)
                .migration(realmMigration)
                .build();
        return Realm.getInstance(realmConfiguration);
    }

    public static RealmMigration realmMigration = (realm, oldVersion, newVersion) -> {
        RealmSchema realmSchema = realm.getSchema();
    };
}
